<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
TuneBook (abc4j API Documentation)
</TITLE>

<META NAME="keywords" CONTENT="abc.parser.TuneBook class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="TuneBook (abc4j API Documentation)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TuneBook.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
abc4j API Specification</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../abc/parser/PositionableNote.html" title="class in abc.parser"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../abc/parser/TuneBookListenerInterface.html" title="interface in abc.parser"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?abc/parser/TuneBook.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TuneBook.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
abc.parser</FONT>
<BR>
Class TuneBook</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>abc.parser.TuneBook</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <B>TuneBook</B><DT>extends java.lang.Object</DL>
</PRE>

<P>
This class provides an object representation of a tunebook. It enables you
 to store tunes ordered by reference number.
<P>

<P>
<HR>

<P>

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook()">TuneBook</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an empty tunebook.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook(java.io.BufferedReader)">TuneBook</A></B>(java.io.BufferedReader&nbsp;stream)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use TuneBook(Reader) instead.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook(java.io.BufferedReader, abc.parser.AbcFileParserListenerInterface)">TuneBook</A></B>(java.io.BufferedReader&nbsp;stream,
         <A HREF="../../abc/parser/AbcFileParserListenerInterface.html" title="interface in abc.parser">AbcFileParserListenerInterface</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use TuneBook(Reader, AbcFileParserListenerInterface) instead.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook(java.io.File)">TuneBook</A></B>(java.io.File&nbsp;abcFile)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new tune book from the specified file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook(java.io.File, abc.parser.AbcFileParserListenerInterface)">TuneBook</A></B>(java.io.File&nbsp;abcFile,
         <A HREF="../../abc/parser/AbcFileParserListenerInterface.html" title="interface in abc.parser">AbcFileParserListenerInterface</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new tune book from the specified file and gets feedback 
 from the parsing phasis via the specified listener.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook(java.io.Reader)">TuneBook</A></B>(java.io.Reader&nbsp;stream)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new tune book from the specified stream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#TuneBook(java.io.Reader, abc.parser.AbcFileParserListenerInterface)">TuneBook</A></B>(java.io.Reader&nbsp;stream,
         <A HREF="../../abc/parser/AbcFileParserListenerInterface.html" title="interface in abc.parser">AbcFileParserListenerInterface</A>&nbsp;listener)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new tune book from the specified stream and gets feedback 
 from the parsing phasis via the specified listener.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#addListener(abc.parser.TuneBookListenerInterface)">addListener</A></B>(<A HREF="../../abc/parser/TuneBookListenerInterface.html" title="interface in abc.parser">TuneBookListenerInterface</A>&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener to this tunebook to be aware of tunes changes.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getFile()">getFile</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the file associated to this TuneBook if any.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getHighestReferenceNumber()">getHighestReferenceNumber</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the highest reference number from all the reference
 numbers this tunebook contains.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getReferenceNumbers()">getReferenceNumbers</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the reference numbers of tunes contained in this tunebook.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getTune(int)">getTune</A></B>(int&nbsp;referenceNumber)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the tune with the specified reference number</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getTuneHeader(int)">getTuneHeader</A></B>(int&nbsp;referenceNumber)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the text put just before a tune in an ABC file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getTuneNotation(int)">getTuneNotation</A></B>(int&nbsp;referenceNumber)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the notation of the tune corresponding to the specified
 reference number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#getTunesHeaders()">getTunesHeaders</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns tunes header information of tunes contained in this tunebook.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#putTune(java.lang.String)">putTune</A></B>(java.lang.String&nbsp;tuneNotation)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Puts the specified tune notation in this tunebook.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#removeListener(abc.parser.TuneBookListenerInterface)">removeListener</A></B>(<A HREF="../../abc/parser/TuneBookListenerInterface.html" title="interface in abc.parser">TuneBookListenerInterface</A>&nbsp;l)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a listener from this tunebook.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#removeTune(int)">removeTune</A></B>(int&nbsp;referenceNumber)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the tune with specified reference number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#save()">save</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#saveTo(java.io.File)">saveTo</A></B>(java.io.File&nbsp;file)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves this tunebook to the specified file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#size()">size</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of tunes contained in this tunebook.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../abc/parser/TuneBook.html#toVector()">toVector</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="TuneBook(java.io.File)"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>(java.io.File&nbsp;abcFile)
         throws java.io.FileNotFoundException</PRE>
<DL>
<DD>Creates a new tune book from the specified file.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>abcFile</CODE> - The file that contains tunes in abc notation.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - Thrown if the specified file doesn't exist.</DL>
</DL>
<HR>

<A NAME="TuneBook(java.io.File, abc.parser.AbcFileParserListenerInterface)"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>(java.io.File&nbsp;abcFile,
                <A HREF="../../abc/parser/AbcFileParserListenerInterface.html" title="interface in abc.parser">AbcFileParserListenerInterface</A>&nbsp;listener)
         throws java.io.FileNotFoundException</PRE>
<DL>
<DD>Creates a new tune book from the specified file and gets feedback 
 from the parsing phasis via the specified listener.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>abcFile</CODE> - The file that contains tunes in abc notation.<DD><CODE>listener</CODE> - Listener to be informed of the parsing phasis.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - Thrown if the specified file doesn't exist.</DL>
</DL>
<HR>

<A NAME="TuneBook(java.io.Reader)"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>(java.io.Reader&nbsp;stream)
         throws java.io.IOException</PRE>
<DL>
<DD>Creates a new tune book from the specified stream.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - The stream in abc notation.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - If the stream does not support <CODE>Reader.mark(int)</CODE>, 
 or if some other I/O error occurs</DL>
</DL>
<HR>

<A NAME="TuneBook(java.io.Reader, abc.parser.AbcFileParserListenerInterface)"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>(java.io.Reader&nbsp;stream,
                <A HREF="../../abc/parser/AbcFileParserListenerInterface.html" title="interface in abc.parser">AbcFileParserListenerInterface</A>&nbsp;listener)
         throws java.io.IOException</PRE>
<DL>
<DD>Creates a new tune book from the specified stream and gets feedback 
 from the parsing phasis via the specified listener.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - The stream in abc notation.<DD><CODE>listener</CODE> - Listener to be informed of the parsing phasis.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - If the stream does not support <CODE>Reader.mark(int)</CODE>, 
 or if some other I/O error occurs</DL>
</DL>
<HR>

<A NAME="TuneBook()"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>()</PRE>
<DL>
<DD>Creates an empty tunebook.
<P>
</DL>
<HR>

<A NAME="TuneBook(java.io.BufferedReader)"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>(java.io.BufferedReader&nbsp;stream)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>use TuneBook(Reader) instead.</I>
<P>
<DD>Creates a new tune book from the specified stream.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - The stream in abc notation.</DL>
</DL>
<HR>

<A NAME="TuneBook(java.io.BufferedReader, abc.parser.AbcFileParserListenerInterface)"><!-- --></A><H3>
TuneBook</H3>
<PRE>
public <B>TuneBook</B>(java.io.BufferedReader&nbsp;stream,
                <A HREF="../../abc/parser/AbcFileParserListenerInterface.html" title="interface in abc.parser">AbcFileParserListenerInterface</A>&nbsp;listener)</PRE>
<DL>
<DD><B>Deprecated.</B>&nbsp;<I>use TuneBook(Reader, AbcFileParserListenerInterface) instead.</I>
<P>
<DD>Creates a new tune book from the specified stream and gets feedback 
 from the parsing phasis via the specified listener.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>stream</CODE> - The stream in abc notation.<DD><CODE>listener</CODE> - Listener to be informed of the parsing phasis.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="saveTo(java.io.File)"><!-- --></A><H3>
saveTo</H3>
<PRE>
public void <B>saveTo</B>(java.io.File&nbsp;file)
            throws java.io.IOException</PRE>
<DL>
<DD>Saves this tunebook to the specified file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - The file where all tunes notation should be stored.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - Thrown if the specified file doesn't exist.</DL>
</DD>
</DL>
<HR>

<A NAME="getFile()"><!-- --></A><H3>
getFile</H3>
<PRE>
public java.io.File <B>getFile</B>()</PRE>
<DL>
<DD>Returns the file associated to this TuneBook if any.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>Returns the file associated to this TuneBook if any.
 <TT>null</TT> is returned if this TuneBook has been created from 
 scratch for instance.</DL>
</DD>
</DL>
<HR>

<A NAME="save()"><!-- --></A><H3>
save</H3>
<PRE>
public void <B>save</B>()
          throws java.io.IOException</PRE>
<DL>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE></DL>
</DD>
</DL>
<HR>

<A NAME="putTune(java.lang.String)"><!-- --></A><H3>
putTune</H3>
<PRE>
public <A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A> <B>putTune</B>(java.lang.String&nbsp;tuneNotation)</PRE>
<DL>
<DD>Puts the specified tune notation in this tunebook.
 If a tune with the same reference number was already existing, it updates
 it. If it's a new tune, it adds it.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tuneNotation</CODE> - A string that describes a tune using ABC notation.
<DT><B>Returns:</B><DD>The Tune representation of the tuneNotation parameter.</DL>
</DD>
</DL>
<HR>

<A NAME="removeTune(int)"><!-- --></A><H3>
removeTune</H3>
<PRE>
public <A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A> <B>removeTune</B>(int&nbsp;referenceNumber)</PRE>
<DL>
<DD>Removes the tune with specified reference number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>referenceNumber</CODE> - The reference number of the tune that has to be
 removed.
<DT><B>Returns:</B><DD>The tune that has been removed, <TT>null</TT> if no tune with the
 corresponding reference number has been found.</DL>
</DD>
</DL>
<HR>

<A NAME="getTune(int)"><!-- --></A><H3>
getTune</H3>
<PRE>
public <A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A> <B>getTune</B>(int&nbsp;referenceNumber)</PRE>
<DL>
<DD>Returns the tune with the specified reference number
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>referenceNumber</CODE> - The reference number of the tune that should be retrieved.
<DT><B>Returns:</B><DD>The tune corresponding to the specified reference number, <TT>null</TT>
 if no tune found.</DL>
</DD>
</DL>
<HR>

<A NAME="getTuneHeader(int)"><!-- --></A><H3>
getTuneHeader</H3>
<PRE>
public java.lang.String <B>getTuneHeader</B>(int&nbsp;referenceNumber)</PRE>
<DL>
<DD>Returns the text put just before a tune in an ABC file.
 For instance, with a file such as : 
 <PRE>
 %text 1 before the first tune
 X:5
 T:xxxx
 K:D
 ...
 </PRE>
 the invokation <PRE>getTuneHeader(5)</PRE> would return the string
 <PRE>"%text 1 before the first tune\n"</PRE>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The text put just before a tune in an ABC file.</DL>
</DD>
</DL>
<HR>

<A NAME="getTuneNotation(int)"><!-- --></A><H3>
getTuneNotation</H3>
<PRE>
public java.lang.String <B>getTuneNotation</B>(int&nbsp;referenceNumber)
                                 throws <A HREF="../../abc/notation/NoSuchTuneException.html" title="class in abc.notation">NoSuchTuneException</A></PRE>
<DL>
<DD>Returns the notation of the tune corresponding to the specified
 reference number.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>referenceNumber</CODE> - A reference number.
<DT><B>Returns:</B><DD>A tune notation in ABC format. <TT>null</TT> if no tune has been
 found.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../abc/notation/NoSuchTuneException.html" title="class in abc.notation">NoSuchTuneException</A></CODE> - Thrown if the specified reference number
 doesn't exist in this tunebook.</DL>
</DD>
</DL>
<HR>

<A NAME="getTunesHeaders()"><!-- --></A><H3>
getTunesHeaders</H3>
<PRE>
public <A HREF="../../abc/notation/Tune.html" title="class in abc.notation">Tune</A>[] <B>getTunesHeaders</B>()</PRE>
<DL>
<DD>Returns tunes header information of tunes contained in this tunebook.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>An array containing <TT>Tune</TT> objects representing header
 information of tunes contained in this tunebook.</DL>
</DD>
</DL>
<HR>

<A NAME="getReferenceNumbers()"><!-- --></A><H3>
getReferenceNumbers</H3>
<PRE>
public int[] <B>getReferenceNumbers</B>()</PRE>
<DL>
<DD>Returns the reference numbers of tunes contained in this tunebook.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>An array containing the reference numbers of tunes contained in
 this tunebook, ordered in the way they were added in this tunebook.</DL>
</DD>
</DL>
<HR>

<A NAME="getHighestReferenceNumber()"><!-- --></A><H3>
getHighestReferenceNumber</H3>
<PRE>
public int <B>getHighestReferenceNumber</B>()</PRE>
<DL>
<DD>Returns the highest reference number from all the reference
 numbers this tunebook contains.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The highest reference number from all the reference
 numbers this tunebook contains. -1 is returned if no tune is 
 stored in this tunebook</DL>
</DD>
</DL>
<HR>

<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Returns the number of tunes contained in this tunebook.
<P>
<DD><DL>

<DT><B>Returns:</B><DD>The number of tunes contained in this tunebook.</DL>
</DD>
</DL>
<HR>

<A NAME="toVector()"><!-- --></A><H3>
toVector</H3>
<PRE>
public java.util.Vector <B>toVector</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="addListener(abc.parser.TuneBookListenerInterface)"><!-- --></A><H3>
addListener</H3>
<PRE>
public void <B>addListener</B>(<A HREF="../../abc/parser/TuneBookListenerInterface.html" title="interface in abc.parser">TuneBookListenerInterface</A>&nbsp;l)</PRE>
<DL>
<DD>Adds a listener to this tunebook to be aware of tunes changes.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - The listener to be added.</DL>
</DD>
</DL>
<HR>

<A NAME="removeListener(abc.parser.TuneBookListenerInterface)"><!-- --></A><H3>
removeListener</H3>
<PRE>
public void <B>removeListener</B>(<A HREF="../../abc/parser/TuneBookListenerInterface.html" title="interface in abc.parser">TuneBookListenerInterface</A>&nbsp;l)</PRE>
<DL>
<DD>Removes a listener from this tunebook.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>l</CODE> - The listener to be removed.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TuneBook.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
abc4j API Specification</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../abc/parser/PositionableNote.html" title="class in abc.parser"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../abc/parser/TuneBookListenerInterface.html" title="interface in abc.parser"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html?abc/parser/TuneBook.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="TuneBook.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
<a href=mailto:lionel.gueganton@libertysurf.fr>Submit a bug or feature<a/>
</BODY>
</HTML>
